<?php

namespace frontend\modules\touch\controllers;

use yii\web\Controller;
use Yii;

/**
 * Default controller for the `touch` module
 */
class ErrorController extends Controller
{
    /**
     * Renders the index view for the module
     * @return string
     */
    public $enableCsrfValidation = false;
    public $layout = 'main';
    public $errorlist = [
        201 => '参数错误',
        202 => '请使用手机浏览器访问',
        210 => '此功能尚在开发中',
    ];

    public function actionIndex($msgid){
        if(isset($this->errorlist[$msgid])){
            $msg = $this->errorlist[$msgid];
        }else{
            $msg = $this->errorlist['201'];
        }
        return $this->render('index',[
            'msg' => $msg,
        ]);
    }
}
